package cn.cheln.support.mobile.media;

import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.media.RingtoneManager;
import android.net.Uri;
import android.provider.MediaStore.Audio.Media;

public class RingtoneUtil
{
  public static final int ALARM = 2;
  public static final int ALL = 3;
  public static final int NOTIFICATION = 1;
  public static final int RINGTONE;

  public static void setVoice(Context paramContext, String paramString, int paramInt)
  {
    String str;
    Uri localUri2;
    ContentValues localContentValues = new ContentValues();
    Uri localUri1 = MediaStore.Audio.Media.getContentUriForPath(paramString);
    Cursor localCursor = paramContext.getContentResolver().query(localUri1, null, "_data=?", new String[] { paramString }, null);
    if ((localCursor.moveToFirst()) && (localCursor.getCount() > 0))
    {
      str = localCursor.getString(0);
      switch (paramInt)
      {
      default:
      case 0:
      case 1:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      paramContext.getContentResolver().update(localUri1, localContentValues, "_data=?", new String[] { paramString });
      localUri2 = ContentUris.withAppendedId(localUri1, Long.valueOf(str).longValue());
      switch (paramInt)
      {
      default:
        return;
        localContentValues.put("is_ringtone", Boolean.valueOf(true));
        localContentValues.put("is_notification", Boolean.valueOf(false));
        localContentValues.put("is_alarm", Boolean.valueOf(false));
        localContentValues.put("is_music", Boolean.valueOf(false));
        continue;
        localContentValues.put("is_ringtone", Boolean.valueOf(false));
        localContentValues.put("is_notification", Boolean.valueOf(true));
        localContentValues.put("is_alarm", Boolean.valueOf(false));
        localContentValues.put("is_music", Boolean.valueOf(false));
        continue;
        localContentValues.put("is_ringtone", Boolean.valueOf(false));
        localContentValues.put("is_notification", Boolean.valueOf(false));
        localContentValues.put("is_alarm", Boolean.valueOf(true));
        localContentValues.put("is_music", Boolean.valueOf(false));
        continue;
        localContentValues.put("is_ringtone", Boolean.valueOf(true));
        localContentValues.put("is_notification", Boolean.valueOf(true));
        localContentValues.put("is_alarm", Boolean.valueOf(true));
        localContentValues.put("is_music", Boolean.valueOf(false));
      case 0:
      case 1:
      case 2:
      case 3:
      }
    }
    RingtoneManager.setActualDefaultRingtoneUri(paramContext, 1, localUri2);
    return;
    RingtoneManager.setActualDefaultRingtoneUri(paramContext, 2, localUri2);
    return;
    RingtoneManager.setActualDefaultRingtoneUri(paramContext, 4, localUri2);
    return;
    RingtoneManager.setActualDefaultRingtoneUri(paramContext, 7, localUri2);
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.support.mobile.media.RingtoneUtil
 * JD-Core Version:    0.5.2
 */